package com.erebus.feignclient;

import com.erebus.model.dto.Cart;
import com.taobao.base.model.RestResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;


@FeignClient(name = "shopcart-api", fallbackFactory = ShopCartClientFactory.class)
public interface ShopCartClient {


    @GetMapping("/shopcart/getCart/{userId}")
    RestResponse<List<Cart>> getCart(@PathVariable("userId") int userId);

    @GetMapping("/shopcart/test")
     void test();
}
